-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom indicators for actions and URLs #1216
base: master
Are you sure you want to change the base?
Conversation
Regarding your last question, probably adding a Also, correct me if I am wrong, does the show_indicators now work like this? But then, how do we recreate the current indicator behavior with this? We should probably try to avoid breaking backwards compatibility for what it's worth. Ps: do %U and %A only print when the notification has an action/url? |
Also we could add a xmore_indicator or something like that for formatting the notification you get with indicate_hidden |
As someone who has no interest in seeing the action count, I'd still need the
They are "A" and "U" (no parenthesis) in the default config, but you will be able to customize them however you want (e.g. "(U)", "Click here", "🔗", etc). When If you want them to be separated (i.e. "(U) (A)"), it could be achieved with a config like this:
This change shouldn't affect current configs, with no
Correct, please see
I don't understand this, could you explain your idea with more detail? (there's no |
Yes, I meant that we can do something like this:
Alternatively to The idea of |
This seems a little hard to make configurable and still make sure everything works as expected (like using plural wording when there are more actions). I would suggest to allow the user to choose between a few pre-selected styles, instead of letting them configure their own strings. |
That sounds reasonable. I've opened #1218 so we can discuss the action count indicator there. Is it ok if I remove I'm trying to figure out the memory leaks and errors in the automated builds. If you can identify quick solutions they'd be welcome, I'm not familiar enough with C to spot them right away. |
I've left my preference in the thread you mentioned. If you could implement that, then I'll look at the memory leaks afterwards. |
Added a waiting-for-info label, since I'm waiting for a different implementation as mentioned in #1218 |
@elamperti are you still planning to finish this PR? |
Hi, I'm busy with other things at the moment and the refactor needed to implement #1218 would take me a considerable effort (I'm not used to C and I was aiming to just have a simple way to show icons/indicators). If someone else can take it from here, it'll be more than welcome. |
Okay, no problem. I'll add a help wanted tag. |
What's new?
Continuing the work of #1150, this PR resolves #509. It adds three new settings:
action_indicator
andurl_indicator
, which replace the values of%A
and%U
respectively in the format string whenever there are actions or URLs in the notificationshow_action_count
, which adds the action count to the default indicator. E.g.: if there are 3 actions for a notification, instead of showing "(A)", withshow_action_count
enabled you will see "(3A)". Users can use the action count in their own format strings with%C
(which will be replaced by the number of actions). Requested by @monkz and @bynect.And also:
%D
in the format string will print how many duplicates a given notification has, if any.Other things included in the PR
notification_update_text_to_render()
to simplify how we create the default dup/action/url indicatorsPending question
After implementing the changes to have
%C
, I'm wondering if going forward we really need to ditchshow_indicators
. Or if we need to have a more powerful solution such as this:so users can set e.g.
format="%s %C"
and dunst picks which part ofaction_count_strings
to show in%C
accordingly.I think this would be a bit convoluted. What do you think?